package com.service.screenReception.enums;

import org.springframework.util.StringUtils;

public enum LinkEnum {

    LINK_INFO("24","站点设备数据");

    private String code;
    private String description;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    private LinkEnum(String code, String description) {
        this.code = code;
        this.description = description;
    }

    public static LinkEnum get(String code){
        if (StringUtils.hasLength(code)) {
            for (LinkEnum element : LinkEnum.values()) {
                if (element.getCode().equals(code)) {
                    return element;
                }
            }
        }
        return null;
    }

}
